import pymongo
from config import config


class MonDB:
    client = None
    db = None
    record = None
    device = None
    type = None

    def __init__(self):
        self.client = pymongo.MongoClient(config['mongo.host'], int(config['mongo.port']))
        self.db = self.client[config['mongo.db']]
        self.record = self.db["CL_Record"]
        self.device = self.db["CL_DEVICE"]
        self.type = self.db["CL_TEST_TYPE"]


conn = MonDB()

